package com.lib.framework.network

import retrofit2.Retrofit

/**
 * Copyright (C), 2019-2020
 * FileName: OkHttpClientFactory
 * Author: Kevin
 * Date: 2020-01-06 15:47
 * Description: Retrofit 的工厂类
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class RetrofitFactory {

    companion object {

        /**
         * 创建 OkHttpClient
         */
        fun createRetrofit(retrofitConfig: RetrofitConfig): Retrofit {
            val builder = Retrofit.Builder()
            retrofitConfig.configBuilder(builder)
            return builder.build()
        }
    }
}